package cn.gson.crm.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the SHAREDTRANSFER database table.
 * 
 */
@Entity
@NamedQuery(name="Sharedtransfer.findAll", query="SELECT s FROM Sharedtransfer s")
public class Sharedtransfer implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="SHAREDTRANSFER_STID_GENERATOR", sequenceName="SEQ_48")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SHAREDTRANSFER_STID_GENERATOR")
	@Column(name="ST_ID")
	private String stId;

	@Column(name="CUST_CNAME")
	private String custCname;

	@Column(name="CUST_ID")
	private BigDecimal custId;

	@Column(name="CUST_NAME")
	private String custName;

	@Column(name="CUST_OPERAT")
	private String custOperat;

	@Column(name="\"OPEN\"")
	private BigDecimal open;

	private BigDecimal readerroots;

	private BigDecimal writeroots;

	//bi-directional many-to-one association to Customerinfo
	@OneToMany(mappedBy="sharedtransfer")
	private List<Customerinfo> customerinfos;

	//bi-directional many-to-one association to Customerinfo
	@ManyToOne
	@JoinColumn(name="CUS_CUST_ID")
	private Customerinfo customerinfo;

	public Sharedtransfer() {
	}

	public String getStId() {
		return this.stId;
	}

	public void setStId(String stId) {
		this.stId = stId;
	}

	public String getCustCname() {
		return this.custCname;
	}

	public void setCustCname(String custCname) {
		this.custCname = custCname;
	}

	public BigDecimal getCustId() {
		return this.custId;
	}

	public void setCustId(BigDecimal custId) {
		this.custId = custId;
	}

	public String getCustName() {
		return this.custName;
	}

	public void setCustName(String custName) {
		this.custName = custName;
	}

	public String getCustOperat() {
		return this.custOperat;
	}

	public void setCustOperat(String custOperat) {
		this.custOperat = custOperat;
	}

	public BigDecimal getOpen() {
		return this.open;
	}

	public void setOpen(BigDecimal open) {
		this.open = open;
	}

	public BigDecimal getReaderroots() {
		return this.readerroots;
	}

	public void setReaderroots(BigDecimal readerroots) {
		this.readerroots = readerroots;
	}

	public BigDecimal getWriteroots() {
		return this.writeroots;
	}

	public void setWriteroots(BigDecimal writeroots) {
		this.writeroots = writeroots;
	}

	public List<Customerinfo> getCustomerinfos() {
		return this.customerinfos;
	}

	public void setCustomerinfos(List<Customerinfo> customerinfos) {
		this.customerinfos = customerinfos;
	}

	public Customerinfo addCustomerinfo(Customerinfo customerinfo) {
		getCustomerinfos().add(customerinfo);
		customerinfo.setSharedtransfer(this);

		return customerinfo;
	}

	public Customerinfo removeCustomerinfo(Customerinfo customerinfo) {
		getCustomerinfos().remove(customerinfo);
		customerinfo.setSharedtransfer(null);

		return customerinfo;
	}

	public Customerinfo getCustomerinfo() {
		return this.customerinfo;
	}

	public void setCustomerinfo(Customerinfo customerinfo) {
		this.customerinfo = customerinfo;
	}

}